package com.dong.bean.beanDefinition;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * description
 *
 * @author Administrator 2021/09/02 14:47
 */
public class BeanDefinitionTest {

    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("com.dong.bean.beanDefinition");

        User user = (User)context.getBean("user-instance");
        User user1 = (User)context.getBean("user-definition");

        System.out.println(user);
        System.out.println(user1);
    }

}
